#ifndef INPUT2017
#define INPUT2017

#include <windows.h>

bool IsKeyDown(int vk_code);


class Input
{
public:
    Input();
    ~Input();

public:
    enum KEY
    {
        K_ESC = VK_ESCAPE,
        K_SPACE = VK_SPACE,
        K_LEFT = VK_LEFT,
        K_RIGHT = VK_RIGHT,
        K_UP = VK_UP,
        K_DOWN = VK_DOWN,
        K_W = 87,
        K_A = 65,
        K_D = 68,
        K_S = 83,
        K_Q = 81,
        K_ENTER = VK_RETURN,
        K_LB = VK_LBUTTON,
        K_RB = VK_RBUTTON,
    };

    enum COMMAND
    {
        CM_LEFT = 0,
        CM_RIGHT,
        CM_UP,
        CM_DOWN,
        CM_QUIT,
        CM_STOP,
    };

protected:
    COMMAND m_command;
    int m_commandState[CM_STOP + 1];
    void zeroStates();

public:
    void test();
    void update(float detalTime);
    COMMAND getCommand(){return m_command;}
    bool getCommandState(COMMAND cmd);
};
#endif // INPUT2017
